﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="BaseData_ProductColumnSP" Codebehind="ProductColumnSP.aspx.cs" %>

<%@ Register Src="../Controls/SHANGPINListControl.ascx" TagName="SHANGPINListControl"
    TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
        <script type="text/javascript" src="../Include/Js/PopupCalendar.js"></script>
    <script type="text/javascript" src="../Include/Js/OpenWindow.js"></script>

    <script type="text/javascript">
     function GetPreUpProducts(path) 
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=SearchPreUpProduct.aspx?p=0', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:600px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //__doPostBack("SearchProduct",handle);
	            setValue(handle);
	        }
        }      
     function setValue(sdata)
     {
        var objdst=document.getElementById("Select1");
            for(var a=objdst.options.length;a>0;a--)
            {
                objdst.options[a-1].parentNode.removeChild(objdst.options[a-1]);
            }   
        var ar=sdata.split("|");
        for(var i=0;i<ar.length;i++)
        {
            var array=ar[i].split(",");
            var option = new Option(unescape(array[1]),array[0]);
            objdst.add(option,objdst.options.length+1);              
        }
             var hd=document.getElementById("Hidden1");
            for(var i=0;i<objdst.options.length;i++)
            {
                hd.value+=objdst.options[i].value+",";
            }        
     }
     function deloption()
     {
        var objdst=document.getElementById("Select1");
        for(var a=objdst.options.length;a>0;a--)
        {
            if(objdst.options[a-1].selected)
            {
                objdst.options[a-1].parentNode.removeChild(objdst.options[a-1]);
            }
             var hd=document.getElementById("Hidden1");
            for(var i=0;i<objdst.options.length;i++)
            {
                hd.value+=objdst.options[i].value+",";
            }
        }        
     }
    function jsf()
    {
        var objdst=document.getElementById("Select1");
      
        var hd=document.getElementById("Hidden1");
        hd.value="";
        for(var i=0;i<objdst.options.length;i++)
        {
            hd.value+=objdst.options[i].value+",";
        }
        
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div align="Justify">
    <h2>商品类别所属商品</h2>
      <div class="juli5">
        <table cellspacing="0" width=100% cellpadding="0" border="0">
            <tr>
                <td valign="top" align="left" style="height: 449px">
                <div class="menu_bg1"><div class="btlj1"><a href="javascript:void(0);" onclick="SearchProduct('../');">添加商品</a></div>
                <div class="btlj1"><a href="javascript:void(0);" onclick="deloption();">删除商品</a></div>

                    <asp:LinkButton ID="Button1" CssClass="btlj1" runat="server" OnClick="Button1_Click">保  存</asp:LinkButton></div>
                <br />
                    　　<select id="Select1" multiple="true" style="width: 208px; height: 296px" runat="server"></select>
          </td>
            </tr>
        </table> <input id="Hidden1" runat="server" type="hidden" />
          </div>
    
    </div>
    </form>
</body>
</html>
